import { createApp } from "vue";
import "normalize.css"; //重置样式的包
import "./style.css";
import router from "./router/index.js";
import { createPinia } from "pinia"; //1. 引入
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import App from "./App.vue"; //根组件，所有其他组件都需要通过根组件进行现实

const pinia = createPinia(); //2. 调用
pinia.use(piniaPluginPersistedstate);
let app = createApp(App); //创建vue对象
app.use(router); //注入路由
app.use(pinia); // 3. 注入状态机
app.mount("#app"); //挂载节点
